package com.topvision.common.enumeration;

/**
 * @author shengwm
 * @version V0.0.1
 * @Title: JobStatus
 * @Package com.topvision.common.enumeration
 * @Description: 在职状态
 * @date 2017/4/18 13:49
 */
public enum JobStatus implements BaseEnum {
    ON_JOB("on_job", "在职"), OUT_JOB("out_job", "离职");

    private final String value;
    private final String label;

    JobStatus(String value, String label) {
        this.value = value;
        this.label = label;
    }

    /**
     * 获取值
     *
     * @return
     */
    @Override
    public String getValue() {
        return value;
    }

    /**
     * 获取标签
     *
     * @return
     */
    @Override
    public String getLabel() {
        return label;
    }

    /**
     * vlaue
     *
     * @param vlaue
     * @return
     */
    public static JobStatus getJobStatusByValue(final String vlaue) {
        for (JobStatus subEnum : values()) {
            if (subEnum.getValue().equals(vlaue)) {
                return subEnum;
            }
        }
        return null;
    }
}
